home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / awt / SentEvent.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.2 KB  |  57 lines

  1. package java.awt;
  2.  
  3. import sun.awt.AppContext;
  4. import sun.awt.SunToolkit;
  5.  
  6. class SentEvent extends AWTEvent implements ActiveEvent {
  7.    private static final long serialVersionUID = -383615247028828931L;
  8.    // $FF: renamed from: ID int
  9.    static final int field_0 = 1007;
  10.    boolean dispatched;
  11.    private AWTEvent nested;
  12.    private AppContext toNotify;
  13.  
  14.    SentEvent() {
  15.       this((AWTEvent)null);
  16.    }
  17.  
  18.    SentEvent(AWTEvent var1) {
  19.       this(var1, (AppContext)null);
  20.    }
  21.  
  22.    SentEvent(AWTEvent var1, AppContext var2) {
  23.       super(var1 != null ? var1.getSource() : Toolkit.getDefaultToolkit(), 1007);
  24.       this.nested = var1;
  25.       this.toNotify = var2;
  26.    }
  27.  
  28.    public void dispatch() {
  29.       try {
  30.          if (this.nested != null) {
  31.             Toolkit.getEventQueue().dispatchEvent(this.nested);
  32.          }
  33.       } finally {
  34.          this.dispatched = true;
  35.          if (this.toNotify != null) {
  36.             SunToolkit.postEvent(this.toNotify, new SentEvent());
  37.          }
  38.  
  39.          synchronized(this) {
  40.             this.notifyAll();
  41.          }
  42.       }
  43.  
  44.    }
  45.  
  46.    final void dispose() {
  47.       this.dispatched = true;
  48.       if (this.toNotify != null) {
  49.          SunToolkit.postEvent(this.toNotify, new SentEvent());
  50.       }
  51.  
  52.       synchronized(this) {
  53.          this.notifyAll();
  54.       }
  55.    }
  56. }
  57.